Skip to content

feat(wallet): expose initializationConfigurations on the Wallet constructor#8881

Draft
grypez wants to merge 2 commits into
grypez/wallet-injectable-loggerfrom
grypez/wallet-init-configurations
Draft

feat(wallet): expose initializationConfigurations on the Wallet constructor#8881
grypez wants to merge 2 commits into
grypez/wallet-injectable-loggerfrom
grypez/wallet-init-configurations

Conversation

@grypez
Copy link
Copy Markdown

@grypez grypez commented May 21, 2026

Summary

Part of a stack on top of #8880.

  • Adds optional initializationConfigurations?: InitializationConfiguration<unknown, unknown>[] to the Wallet constructor.
  • Configurations whose name matches a default controller replace it; configurations with novel names are appended after the defaults.
  • Allows callers to swap out a controller (e.g. inject a test double) or extend the default ensemble without subclassing Wallet.

Closes #8795

Test plan

  • yarn workspace @metamask/wallet run test passes (includes a test that passes a custom config and verifies its init is called)
  • yarn constraints passes
  • yarn validate:changelog passes

🤖 Generated with Claude Code

grypez and others added 2 commits May 21, 2026 09:44
…ructor

Allows callers to pass an array of InitializationConfiguration objects
to override or extend the default controller set. Overridden controllers
replace their default counterpart by name; additional controllers are
appended to the initialization sequence.

Closes #8795

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exercises the map callback in initialize() that extracts overridden names,
which was previously uncovered because no test passed a non-empty
initializationConfigurations array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant